package com.qipa.netty.heartbeat;

import io.netty.channel.socket.SocketChannel;

/**
 * 心跳辅助类，保存SocketChannel
 * Created by Ethan on 2018/11/22.
 */
public class ChannelMapObject {
    private int lostHeartBeatCount = 0;//心跳记录，记录多少次才真正回收连接
    private SocketChannel SC;

    public SocketChannel getSC() {
        return SC;
    }

    public void setSC(SocketChannel SC) {
        this.SC = SC;
    }

    public ChannelMapObject(SocketChannel socketChannel) {
        this.SC = socketChannel;
    }

    public int getLostHeartBeatCount() {
        return this.lostHeartBeatCount;
    }

    public void plusLostCount() {
        this.lostHeartBeatCount++;
    }

    public SocketChannel getSocketChannel() {
        return this.SC;
    }
}
